# coding=utf8
from pyjvm.instructions.common import Instruction
from pyjvm.instructions.invoke import invoke_native
from pyjvm.runtime.thread import Frame


class INVOKE_NATIVE(Instruction):

    def execute(self, frame: Frame):
        method = frame.method
        invoke_native(frame, method)
        self.record = 'INVOKE_NATIVE %s %s.%s(%s)' % (method.return_type,
                                                      method.klass.name, method.name,
                                                      ','.join(method.parameter_types))


__all__ = ['INVOKE_NATIVE']
